package day5;

// 如果一个类没有继承任何一个类，默认继承Object类
// 因为Java是单继承的，如果已经继承了一个类，那么就不会再继承Object了
public class Person/* extends Object*/{
    protected int id;
    protected String name;
    protected int age;

    public Person() {
        //super();
    }

    public Person(int id, String name, int age) {
        //super();
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public void show() {
        System.out.println("id: " + id + ", name: " + name + ", age: " + age);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
